<template>
	<view>
		<!-- {{addressList}} -->
		<category-list :categories="categories"></category-list>
	</view>
</template>

<script>
	import categoryList from '@/components/category.vue';
	
	export default {
		components: {
			categoryList,
		},
		data() {
			return {
				addressList:[],
				categories: [],
			}
		},
		onLoad(){
			this.getAddress()
			this.getCategories()
		},
		methods: {
			async getAddress() {
				let that = this
				let response = await this.$api.getAddress()
				this.addressList = response.data
				console.log(this.addressList)
			},
			async getCategories() {
				let that = this
				let requestData = {}
				let response = await this.$api.getCategories()
				this.categories = response.data
				console.log(this.categories)
			},
		}
	}
</script>

<style>

</style>
